package diko_parent.eduservice.controller;


import com.diko.commonUtils.R;
import diko_parent.eduservice.entity.frontVo.openId;
import diko_parent.eduservice.service.OpenidService;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Emma-Li
 * @since 2020-12-11
 */
@RestController
@CrossOrigin
@RequestMapping("/eduservice/openid")
public class OpenidController {

    @Autowired
    OpenidService openidService;

    @PostMapping(value="save")
    public R saveOpenid(
            @ApiParam(name="save",value = "保存订单信息",required = true)
            @RequestBody openId openid
            ){
        boolean save=openidService.save(openid);
        return save?R.ok():R.error();
    }
}

